import Vue from 'vue'
import VueRouter from 'vue-router'
import { routes } from './routes'
Vue.use(VueRouter)

 
// ;(function (getRoutes) {
//   const routesList = getRoutes.keys().reduce((p, c) => {
//     return [...p, ...(getRoutes(c).default)]
//   }, [])
// })(require.context('', true, /\.js$/))

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
